package cn.zane.chatgpt.data.domain.weixin.service.validate;

import cn.zane.chatgpt.data.domain.weixin.service.IWeiXinValidateService;
import cn.zane.chatgpt.data.types.util.sdk.SignatureUtil;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;

/**
 * @author: zane
 * @date: 2025-09-19
 * @description: 微信校验服务
 */
@Service
public class WeiXinValidateService implements IWeiXinValidateService {

    @Value("${wx.config.token}")
    private String token;


    @Override
    public Boolean checkSignature(String signature, String timestamp, String nonce) {
        return SignatureUtil.checkSignature(token, signature, timestamp, nonce);
    }
}
